/**
 * @projectName demo-master
 * @fileName TestController.java
 * @packageName org.example.nacos.config.controller
 * @author xaoyaoyao
 * @date 2021/3/29 15:46
 * @version V1.0
 * @copyright (c) 2021, xaoyaoyao@aliyun.com All Rights Reserved.
 */
package org.example.nacos.config.controller;

import com.alibaba.nacos.api.config.annotation.NacosValue;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @className TestController
 * @description
 * @author xaoyaoyao
 * @date 2021/3/29 15:46
 */
@Controller
@RequestMapping("config")
public class TestController {

	@NacosValue(value = "${useLocalCache:false}", autoRefreshed = true)
	private boolean useLocalCache;

	@RequestMapping(value = "/get", method = RequestMethod.GET)
	@ResponseBody
	public boolean get() {
		return useLocalCache;
	}
}
